From 539fc27b10ab37e229ae6b8b3326670607f899cc Mon Sep 17 00:00:00 2001 From: Zheng Zhu Date: Mon, 20 Sep 2004 05:22:45 +0000 Subject: [PATCH] added a language variant field to the page rendering hash, but only for languages that support multiple variants. --- includes/User.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/User.php b/includes/User.php index 332c6fce40..a38f60c178 100644 --- a/includes/User.php +++ b/includes/User.php @@ -814,6 +814,7 @@ class User { } function getPageRenderingHash() { + global $wgLang; if( $this->mHash ){ return $this->mHash; } @@ -830,6 +831,12 @@ class User { $confstr .= '!' . $this->getOption( 'date' ); $confstr .= '!' . $this->getOption( 'numberheadings' ); + // add in language variant option if there are multiple variants + // supported by the language object + if(sizeof($wgLang->getVariants())>1) { + $confstr .= '!' . $this->getOption( 'variant' ); + } + $this->mHash = $confstr; return $confstr ; } -- 2.20.1